<div id="hotel-placeholder">

    <div id="wrap" class="clearfix">

        <div id="aside">

            <h3 class="main-title" style="font-size: 17px;"><?= lang('search.best.60sec') ?></h3>

            <? $this->load->view('hotels/parts/search_box') ?>
			<? $this->load->view('destinations/parts/banner') ?>
            <? $this->load->view('hotels/parts/map_box') ?>

        </div><!-- / Aside -->

        <div id="main">

            <div class="tabs home-slider">

                <? $cnt=count($action_1); ?>

                <ul>
                    <?
                        for($j=0; $j < $cnt; $j++)
                        {
                            ?>
                            <li><a href="#tabs-<?= $j + 1 ?>"><?= $j + 1 ?></a></li>
                        <? } ?>
                </ul>

                <?
                    for($i=0; $i < $cnt; $i++)
                    {
                        ?>

                        <div class="slider-box" id="tabs-<?= $i + 1 ?>">

                            <? $href=base_url('hotels/details_preview?hotel_id='.$action_1[$i]->object_ID) ?>

                            <? $thumbnail=$host_url.'gallery/'.$action_1[$i]->photo_path.'/thumb_612x372/'.$action_1[$i]->photo_name; ?>

                            <div class="info">
                                <h2><?= $action_1[$i]->object_name ?></h2>
                                <p><?= clean_html($action_1[$i]->object_information); ?></p>
                                <a href="<?= $href ?>" class="button"><?= lang('shared.book.now') ?> &raquo;</a>
                                <span class='big'><?= $action_1[$i]->rooms[0]->selling_total ?>€ <span>/ <?= lang('day') ?></span></span>
                            </div>
                            <img src="<?= $thumbnail ?>" alt="<?= $action_1[$i]->object_name ?>"> 
                        </div>

                    <? } ?> <!-- / Slider Box -->

            </div><!-- / Home Slider -->
			<div class='title hotels-title'>
				<h1><?= lang('title.hotels.homepage') ?></h1>
			</div>		
			<div class='homepage-description'>
				<p><?= lang('description.hotels.homepage') ?></p>
			</div>
            <div class="three-columns exc-featured clearfix">

                <? if(isset($action_2)): ?>

                        <? $cnt=count($action_2); ?>

                        <?
                        for($i=0; $i < $cnt; $i++)
                        {
                            if($i == 12)
                                break;
                            ?>

                            <div class="car-box">

                                <? $href=base_url('hotels/details_preview?hotel_id='.$action_2[$i]->object_ID) ?>

                                <? $thumbnail=$host_url.'gallery/'.$action_2[$i]->photo_path.'/thumb_70x70/'.$action_2[$i]->photo_name; ?>

                                <? $pices=explode(" ", $action_2[$i]->object_name); ?>
								
								<h2><span class='homeTitleSpan'><?= $pices[0] ?></span>
								<? for($j=1; $j <= count($pices) - 1; $j++)
									{
										echo ' '.$pices[$j];
									} ?>
									
                                <small><?= $action_2[$i]->destination_name; ?></small></h2>

								<!--<h3><?= $pices[0] ?></h3>

								<h4><? for($j=1; $j <= count($pices) - 1; $j++)
                                    {
										echo ' '.$pices[$j];
									} ?></h4>-->


                                <img src="<?= $thumbnail ?>" alt="<?= $action_2[$i]->object_name ?>"> 
                                <a href="<?= $href ?>" class="button"><?= lang('shared.book.now') ?> &raquo;</a>
                                <span class='big'><?= $action_2[$i]->rooms[0]->selling_total ?>€ <span>/ <?= lang('day') ?></span></span>
                            </div><!-- / Car box -->

                        <? } ?>

                    <? endif; ?>

            </div><!-- / Three Columns -->

            <div class="two-columns clearfix">
                <? $this->load->view('parts/two_column') ?>
            </div>

        </div><!-- / Main -->

    </div><!-- / Wrap -->

</div><!-- / Home placeholder -->

<div id="hide_content">
    <div id="google_box" style="">
        <div class="clearfix">

            <div id="google-list">

                <?
                    $objects=$gmap_hotels;

                    $index=0;
                    if($objects)
                        foreach($objects as $object):
                            if(isset($object->object_x_coordinate) && $object->object_x_coordinate != ""):
                                if(isset($object->object_y_coordinate) && $object->object_y_coordinate != ""):

                                    $thumbnail=$host_url.'gallery/'.$object->photo_path.'/thumb_130x130/'.$object->photo_name;
                                    ?>

                                    <div class="GH open-map-<?= $index ?>" data-holder="<?= $index ?>">
                                        <? $index++; ?>
                                        <img src="<?= $thumbnail ?>" alt="<?= $object->object_name; ?>" width="70" />

                                        <div class="title"><?= $object->object_name ?></div>
                                        <div class="subtitle"><?= $object->destination_name ?></div>

                                        <div class="stars">
                                            <?
                                            if($object->object_number_of_stars != ""):


                                                $stars=(int) $object->object_number_of_stars;

                                                for($i=0; $i < $stars; $i++):
                                                    ?>
                                                    <div class="GH-star"></div>
                                                    <?
                                                endfor;
                                            endif;
                                            ?>
                                        </div>


                                        <div class="list"></div>

                                        <?
                                        if(isset($object->rooms) && count($object->rooms) > 0)
                                        {
                                            ?>
                                            <div class="price"><?= $object->rooms[0]->selling_total ?>&euro;</div>


                                            <?
                                        }
                                        else
                                        {
                                            ?>
                                            <div class="no-price"><?= lang('hotell.price_unknown') ?></div>
                                        <? } ?>
                                        <div></div>

                                    </div>

                                    <?
                                endif;
                            endif;
                        endforeach;
                ?>


            </div>

            <div id="google_map">
                <div id="map_canvas" style="width:100%; height:100%"></div>
            </div>

        </div>

    </div>
</div>
<script type="text/javascript">
    
    var LOADMAP = true;
    
<? if($index == 0): ?>
            LOADMAP = false;
    <? endif; ?>
</script>

<? if($index == 0): ?>
        <style>
            #google_box{
                width: 0;
                height: 0;
                overflow: hidden
            }
        </style>
    <? endif; ?>